{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>用户反馈列表</h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
            <div class="row">
                <!--搜索框开始-->
                <div class="col-sm-12">
                    <div class="collapse" id="searchBox">
                        <div class="layui-form layui-form-item">
                            <div class="layui-col-md6 layui-input-inline">
                                <input type="text" id="key" class="layui-input search" name="key" value="" placeholder="反馈人/联系方式"/>
                            </div>
                            <div class="layui-input-inline">
                                <button class="layui-btn" lay-submit="" lay-filter="LAY-search">立即搜索</button>
                                <button  class="layui-btn layui-btn-normal" id="empty"  lay-submit="" lay-filter="LAY-search">重置</button>
                            </div>
                        </div>
                    </div>
                </div>
                <!--搜索框结束-->
                <!--操作框开始-->
                <div class="col-sm-12">
                    <div class="input-group pull-left" >
                        <a href="javascript:;" onclick="tableReload()" class="btn btn-success" data-toggle="tooltip" title="" data-original-title="刷新表格" data-placement="auto">
                            <i class="fa fa-refresh"></i>
                        </a>
                    </div>
                    <div class="input-group pull-right" data-toggle="tooltip" title="" data-original-title="搜索">
                        <button class="btn btn-primary" data-toggle="collapse"
                                data-target="#searchBox" >
                            <i class="glyphicon glyphicon-search"></i>
                        </button>
                    </div>
                </div>
                <!--操作框结束-->
            </div>
            <div class="hr-line-dashed"></div>

            <div class="example-wrap">
                <div class="example">
                    <table class="layui-hide" id="test" lay-filter="demo"></table>
                    <!--状态模板-->
                    <script type="text/html" id="staBar">
                        {{# if(d.f_status == 1){ }}
                            <span class="layui-badge">待处理</span>
                        {{# }else{ }}
                            <span class="layui-badge layui-bg-green">已处理</span>
                        {{# } }}
                    </script>
                    <!--操作模板-->
                    <script type="text/html" id="opeBar">
                        {{# if(d.f_status == 1){ }}
                        <a href="javascript:;"onclick="wk.layer_show('处理反馈','{:url('doUserSuggest')}?id={{d.f_id}}',900)" class="btn btn-primary btn-xs m-r-xs" title="处理反馈"><i class="fa fa-pencil"></i></a>
                        {{# }else{ }}
                        <a href="javascript:;"onclick="wk.layer_show('处理结果','{:url('seeUserSuggest')}?id={{d.f_id}}',900)" class="btn btn-primary btn-xs m-r-xs" title="处理结果"><i class="fa fa-eye"></i></a>
                        {{# } }}
                        <a href="javascript:;"onclick="wk.href('{:url('sendMsg')}?id={{d.f_user_id}}')" class="btn btn-primary btn-xs m-r-xs" title="回复消息"><i class="fa fa-bullhorn"></i></a>
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    //layui渲染数据表格
    layui.use('table', function () {
        var table = layui.table
            , form = layui.form;
        table.render({
            elem: '#test'
            , url: '{:url("Suggest/index")}'
            , page: true
            , even: false //开启隔行背景
            , size: 'lg' //sm小尺寸的表格 lg大尺寸
            // ,width:100
            , cellMinWidth: 150
            , limits: [5, 10, 15, 20, 25, 30]
            , limit: "{:config('pages')}"
            , text: {
                none: '暂无数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
            }
            , loading: true
            , id: 'testReload'
            , cols: [[
                {type:'numbers', width: 80, title: '序号'}
                , {field: 'user_username', width: '', title: '反馈人', align: 'center'}
                , {field: 'f_phone', width: '', title: '联系方式', align: 'center'}
                , {field: 'cate_name', width: '', title: '反馈分类', align: 'center'}
                , {field: 'f_content', width: '', title: '反馈内容', align: 'center'}
                , {field: 'f_time', width: '', title: '反馈时间', align: 'center'}
                , {field: 'f_status',fixed: 'right', width: 100, title: '状态',align: 'center', templet: '#staBar'}
                , {fixed: 'right', width: 100, title: '操作', align: 'center', toolbar: '#opeBar'}
            ]]
        });
    });
</script>
</body>
</html>